﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace InsideDL.MISService
{
    public class VerifyARTM95_ABCDE : VerifyMatrix
    {
        public override bool CheckFileInFtp(object[] p_list)
        {
            string[] list = p_list[0] as string[];
            string ym = Convert.ToString(p_list[1]);
            downList = (from aa in
                             (from fl in list
                                    where fl.IndexOf(".CSV") > 0
                                    orderby fl.Substring(8) descending
                                    select fl)
                               where aa.Substring(8, 6).Equals(ym) &
                                    (aa.Substring(6, 1).Equals("A")
                                        || aa.Substring(6, 1).Equals("C")
                                        || aa.Substring(6, 1).Equals("D")
                                        || aa.Substring(6, 1).Equals("B")
                                        || aa.Substring(6, 1).Equals("E"))
                               select aa).ToArray();
            return downList.Length == 5 ? true : false;
        }
    }
}
